import { connect } from 'react-redux'

const Authority = connect((state) => state.authority)((props) => {
  const { role, children, accessRole = 2 } = props
  return role === accessRole ? children : null
})
export default Authority
